var numItems = $('.item').length;
// Gets the number of elements with class yourClass var numItems = $('.yourclass').length